<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <!-- 简历样式自定义表控制transition控制列表 -->
    <style>
        /* v-enter 进入前 */
        .v-enter,
        .v-leave-to{
            opacity: 0;
            transform: translateX(150px)
        }

        /*  v-enter-active 入场时间段 */
        /*  v-leave-active 出场时间段 */
        .v-enter-active,
        .v-leave-active{
            /* all 哪些属性 */
            transition: all 2s ease;
            
        }

        /* v-enter 进入前 */
        .my-enter,
        .my-leave-to{
            opacity: 0;
            transform: translateY(70px)
        }

        /*  my-enter-active 入场时间段 */
        /*  my-leave-active 出场时间段 */
        .my-enter-active,
        .my-leave-active{
            /* all 哪些属性 */
            transition: all 2s ease;
            
        }
    </style>
</head>
<body>
    
    <div id="app">
        <input type="button" value="toggle" @click='flag=!flag'>
        <transition>
            <h1 v-if="flag">这是一个h1</h1>        
        </transition>
<hr>
        <input type="button" value="toggle2" @click='flag2=!flag2'>
        <transition name="my">
            <h2 v-if="flag2">这是一个h2</h2>        
        </transition>
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            data:{
                flag:false,
                flag2:false,

            },
            methods: {
                
            },
        })
    </script>
</body>
</html>